//
//  BaseView.swift
//  Chatup
//
//  Created by iron man on 2023/12/11.
//

import SwiftUI



struct NavView: View {
    @Binding var title: String?
    @Environment(\.presentationMode) var presentationMode
    var body: some View {
        HStack {
            Button(action: {presentationMode.wrappedValue.dismiss()}, label: {
                Image("icon_back")
            })
            Spacer()
            Text(title ?? "")
                .font(.system(size: 20, weight: .bold))
                .foregroundColor(.white)
            Spacer()
            Button(action: {}, label: {
                Image("icon_close")
            })
                .opacity(0)
        }
        .padding(.horizontal)
        .padding(.vertical, 8)
    }
}


